package com.dhcc.core.components.httpClient;

import java.util.LinkedHashMap;
import java.util.Map;

import com.dhcc.core.components.httpClient.model.ServiceType;
import com.dhcc.core.components.httpClient.model.exception.ServiceImportException;

public class Test {

    public static void main(String[] args) throws ServiceImportException {
        //t1();
        t2();
    }

    public static void t1() throws ServiceImportException {
        Map<String, Object> data = new LinkedHashMap<>();
        data.put("in0", "济南");
        Object response = HttpClientServiceFactory.getImporter(ServiceType.SOAP)
                .importService("http://58.56.200.227:18082//services/NewEmailListService?wsdl").getEndpoint("getNewEmailListData")
                .buildInvocation(data).invoke().toString();
        System.out.println(response);
    }

    public static void t2() throws ServiceImportException {
        Map<String, Object> data = new LinkedHashMap<>();
        data.put("EpisodeID", "94");
        String string = HttpClientServiceFactory.getImporter(ServiceType.SOAP)
                .importService("http://127.0.0.1:8081/ws/emrRecord?wsdl").getEndpoint("GetVteEvalSheetReport")
                .buildInvocation(data).invoke().response().toString();
        System.out.println("+++++++++++++"+string);
    }

}
